export const getGoList = (MenuList :any)=>{
    const List = MenuList.filter((item:any) => item.parent_id ==0)
    return List.map((item:any) =>{
        const children = getChildList(MenuList,item.menu_id)
        return{
            ...item,
            children
        }
    })
}
export const getChildList =(list:any,menu_id:number)=>{
    const child = list.filter((item:any) => item.parent_id == menu_id)
    return child.map((item:any) =>{
        const children = getChildList(list,item.menu_id)
        return{
          ...item,
            children
        }
    })
}